//package com.wildlife.springboot.controller;
//
//import com.wildlife.springboot.entity.AnimalResult;
//import com.wildlife.springboot.repository.AnimalRepository;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//public class AnimalController {
//
//    private final AnimalRepository animalRepository;
//
//    public AnimalController(AnimalRepository animalRepository) {
//        this.animalRepository = animalRepository;
//    }
//
//    @GetMapping("/api/animals")
//    public List<AnimalResult> getAllAnimals() {
//        return animalRepository.findAllAnimalsWithRelations();
//    }
//}
